package main
import (
	"fmt"
	"runtime"
	"sync"
)
var wg sync.WaitGroup
func hello() {
	defer wg.Done()
	for i:=0;i<10;i++ {
		fmt.Println("hello: ",i)
	}
}
func world() {
	defer wg.Done()
	for i:=100;i<110;i++ {
		fmt.Println("world: ",i)
	}
}
func main() {
	runtime.GOMAXPROCS(2)
	wg.Add(2)
	go hello()
	go world()
	wg.Wait()
}